package com.yh.utils.extract.service;

import com.yh.utils.extract.model.DataSourceDO;

import java.util.List;

public interface DataSourceService  {
    /**
     * 获取全部数据源
     * @Title: queryList
     * @Description:
     * @param
     * @return: List<DataSourceDO>
     * @throws:
     * @author: maliang
     * @Date: 2019/8/8
     */
    List<DataSourceDO> queryList();

    /**
     * 根据ID获取数据源
     * @Title: get
     * @Description:
     * @param id
     * @return: DataSourceDO
     * @throws:
     * @author: maliang
     * @Date: 2019/8/8
     */
    DataSourceDO get(String id);

    /**
     * 插入数据源
     * @Title: save
     * @Description:
     * @param dataSource
     * @return:
     * @throws:
     * @author: maliang
     * @Date: 2019/8/8
     */
    int save(DataSourceDO dataSource) throws Exception;

    /**
     * 批量删除数据源
     * @Title: batchDelete
     * @Description:
     * @param dataSources
     * @return: int
     * @throws:
     * @author: maliang
     * @Date: 2019/8/8
     */
    int batchDelete(List<DataSourceDO> dataSources);

    /**
     * 删除数据源
     * @Title: delete
     * @Description:
     * @param dataSource
     * @return: int
     * @throws:
     * @author: maliang
     * @Date: 2019/8/8
     */
    public int delete(DataSourceDO dataSource);

    public int updateByPrimaryKey(DataSourceDO dataSource) throws Exception;
}
